package net.kong.sns.rest.client.feed;

import net.kong.sns.rest.client.InvalidResponseException;
import net.kong.sns.rest.client.KongApiMethod;
import net.kong.sns.rest.client.method.JsonMethodInvokeBase;
import net.kong.sns.rest.client.rest.HttpResponseContent;

/**
 * @author <a href="mailto:lanhuai@gmail.com">Ning Yubin</a>
 * @version $Id: PublishUserActionMethodInvoke.java,v 1.2 2009/11/04 17:17:38 ningyubin Exp $
 */
public class PublishUserActionMethodInvoke extends JsonMethodInvokeBase<Boolean> {
    public PublishUserActionMethodInvoke(long templateId, String data, String equalKey, String sessionKey) {
        super(KongApiMethod.FEED_PUBLISH_USER_ACTION, sessionKey);
        setParameter("template_id", String.valueOf(templateId));
        setParameter("data", data);
        setParameter("equal_key", equalKey);
    }

    public PublishUserActionMethodInvoke(long templateId, String data, String sessionKey) {
        super(KongApiMethod.FEED_PUBLISH_USER_ACTION, sessionKey);
        setParameter("template_id", String.valueOf(templateId));
        setParameter("data", data);
    }

    @Override
    protected Boolean processJsonResponse(HttpResponseContent responseData) throws InvalidResponseException {
        return true;
    }
}
